<template>
  <div class="login-wrap">
    <div class="login-div">
      <!--左边透明-->
      <div class="left_transparent">
        <div style="width:100%;padding-left:15px;">
          <div style="display:flex;align-items:center;">
            <span style="color:#fff;font-size:22px;">欢迎来到</span>
            <img src="../../../static/images/jiantou.png" class="left_icon"/>
          </div>
          <div class="left_div_white"></div>
          <div>
            <span style="color:#fff;font-size:22px;">监理眼后台管理系统</span>
          </div>
        </div>
      </div>
      <!--右边登录 class="login-form"-->
      <div id="loginIcon" style="text-align: center;">
        <div class="login-btn-t">切换系统</div>
        <div class="login-btn"><a href="javascript:void(0);" @click="pangManage()">
          <small style="color: black;">旁站管理</small>
        </a></div>
        <div class="login-btn"><a href="javascript:void(0);" @click="hesManage()">
          <small style="color: black;">HSE管理</small>
        </a></div>
        <div class="login-btn"><a href="javascript:void(0);" @click="pjManage()">
          <small style="color: black;">平行检验</small>
        </a></div>
        <div class="login-btn"><a href="javascript:void(0);">
          <small style="color: black;">工序检验</small>
        </a></div>
      </div>
    </div>
  </div>
</template>
<script type="text/javascript">
  export default {
    data() {
      return {
        form: {},
      };
    },
    methods: {
      hesManage() {
        window.location.href = `http://yangzidaxingdiaozhuang.com/hse/#/organization/userManagement?userId=${localStorage.getItem('userId')}&roleId=${localStorage.getItem('roleId')}&loginName=${localStorage.getItem('loginName')}&loginAccount=${localStorage.getItem('loginAccount')}&MyPictureID=${localStorage.getItem('MyPictureID')}`;
      },
      pjManage(){
        window.location.href = `http://yangzidaxingdiaozhuang.com/pj/#/organization/userManagement?userId=${localStorage.getItem('userId')}&roleId=${localStorage.getItem('roleId')}&loginName=${localStorage.getItem('loginName')}&loginAccount=${localStorage.getItem('loginAccount')}&MyPictureID=${localStorage.getItem('MyPictureID')}`;
      },
      pangManage(){
        switch (localStorage.getItem("roleId")) {
          case "1":
            this.$router.push({name: "userManagement"});
            break;
          case "2":
            this.$router.push({name: "projectManagement2"});
            break;
          case "3":
            this.$router.push({name: "projectManagement3"});
            break;
        }
      }
  }
  }
  ;
</script>

<style lang="scss" scoped>
  @import "../../assets/css/lib-mixin";

  html,
  body {
    overflow: hidden;
  }

  .login-wrap {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url(../../../static/images/background2.png);
    background-size: cover;
  }

  .login-btn-t {
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-bottom: 2px solid red;
    font-size: 18px;
  }

  .login-btn {
    width: 50%;
    height: 120px;
    line-height: 120px;
    float: left;
  }

  .login-div {
    width: 768px;
    display: flex;
    position: absolute;
    top: 50%;
    left: 20%;
    transform: translateY(-50%);
  }

  /*左边透明*/
  .left_transparent {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px 15px 20px 15px;
    display: flex;
    align-items: center;
    width: 410px;
  }

  /*左侧 图标*/
  .left_icon {
    width: 24px;
    height: 24px;
    margin-left: 10px;
  }

  /*左侧 白色透明 div*/
  .left_div_white {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    height: 2px;
    width: 100%;
    margin: 10px 0;
  }

  /*右侧*/
  #loginIcon {
    background: #fff;
    width: 357px;
    height: 300px;
    padding: 10px 18px 20px 18px;
  }

  .login-form {
    .login-code {
      cursor: pointer;

      .login-code-img {
        width: 100px;
        height: 38px;
        background-color: #eee;
        border: 1px solid #f0f0f0;
        color: #333;
        font-size: 18px;
        font-weight: bold;
        letter-spacing: 2px;
        text-indent: 2px;
        text-align: center;
      }
    }
  }

  /*记住密码一栏*/
  .renmber_pass {
    display: flex;
    justify-content: space-between;
    height: 30px;
    align-items: center;
  }

  .forget_pass {
    cursor: pointer;
    color: #606266;
  }

  .forget_pass:hover {
    color: #409eff;
  }

  /*滑动验证*/
  .form-inline-input {
    border: 1px solid #dddddd;
    border-radius: 5px;
    // text-shadow: 1px 1px 1px black;
  }

  .form-inline-input input,
  .code-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    height: 40px;
    // text-shadow: 1px 1px 1px black;
    background: #dddddd;
    border: 0;
    border-radius: 5px;
    outline: none;
  }

  .code-box {
    position: relative;
  }

  .code-box p {
    display: block;
    position: absolute;
    left: 0;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 5px;
    padding: 0;
    margin: 0;
  }

  .code-box h4 {
    color: #6C6C6C;
    font-weight: normal;
  }

  .code-box span {
    position: absolute;
    left: 0;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 5px;
    padding: 0;
    margin: 0;
    width: 56px;
    background-color: #fff;
    font-size: 16px;
    cursor: pointer;
    margin-right: 1px;
    color: #D6D6D6;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .code-box p {
    color: #fff;
    width: 0;
    background-color: #FFFF99;
    overflow: hidden;
    text-indent: -20px;
    transition: background 1s ease-in;
  }

  .code-box .code-input {
    display: none;
  }

  .code-box .code-input {
    display: none;
  }
</style>
